package com.hjms.mall.share;

import com.hjms.mall.contracts.dto.sku.AddSkuDto;
import com.hjms.mall.contracts.vo.sku.SkuVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 何杨谊
 * @description: 商品服务远程调用接口
 * @date 2022/12/31 21:22
 */
@FeignClient(value = "mall-service")
public interface ISkuFeignService {
    /**
     * 新增商品
     * @param dto
     * @return
     */
    @PostMapping("/api/sku")
    public String Add(@RequestBody AddSkuDto dto);

    /**
     * 获取商品信息
     * @param skuId
     * @return
     */
    @GetMapping("/api/sku/{skuId}")
    public SkuVo Get(@PathVariable(value = "skuId") String skuId);
}